#define content_csdn()
<div class="box box-warning box-jianshu">
    <div class="box-header with-border">
        <h3 class="box-title">CSDN博客设置</h3>
        <div class="pull-right">
            <label>启用</label>
            <input type="hidden" id="csdn" name="csdn" value="#('true'.equals(csdn.enable) ?? false)"/>
            <input type="checkbox" id="csdn_enable" class="switchery platform-enable" data-for="csdn"
                   data-switchery="true" style="display: none;" #(csdn.enable ? "checked" : "")/>
        </div>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <!-- 账号ID -->
        <div class="col-xs-4">
            <div class="form-group col-xs-12">
                <label>username</label>
                <input type="text" id="csdn_username" class="form-control" value="#(csdn.username)" placeholder="xxxxxxx">
            </div>
        </div>
        <!-- Cookie设置 -->
        <div class="col-xs-8">
            <div class="form-group col-xs-12">
                <label>Cookie</label>
                <textarea class="form-control" id="csdn_cookie" rows="5" placeholder="UserToken=xxxxxxx;">#(csdn.cookie)</textarea>
            </div>
        </div>
        <!-- /.box-body -->
    </div>
    <div class="box-footer">
        <button type="button" class="btn btn-default"
                onclick="doverify('csdn', getCsdnConfObj())">
            <i class="fa fa-cog fa-spin fa-fw" style="display:none"></i>验证
        </button>
        <a href="https://gitee.com/nianzecong/jpress-addon-articlesync/blob/master/doc/platCsdn.md" target="_blank">
            <i class="fa fa-fw fa-question-circle"></i>怎么找到这些配置
        </a>
        <button type="button" class="btn btn-info pull-right saveBtn"
                onclick="doSave('csdn', getCsdnConfObj())">
            <i class="fa fa-cog fa-spin fa-fw" style="display:none"></i>保存
        </button>
    </div>
</div>
<script>
    function getCsdnConfObj(){
        return {
            "enable" : $('#csdn_enable').is(":checked"),
            "username" : $('#csdn_username').val(),
            "cookie" : $('#csdn_cookie').val()
        }
    }
</script>
#end
